﻿@model IEnumerable<FPP.Models.FamousPerson>
@{
    ViewBag.Title = "Famous People Pool - Celebrities";
}
<table class="table-header">
    <tr>
        <td align="left">
            <h2>
                Look at all these stars
            </h2>
        </td>
        <td align="right">
            @Html.ActionLink("Create New", "Create")
        </td>
    </tr>
</table>
<div class="span-18 last">
    @for (int i = 0; i < Model.Count() - 1; i++)
    {
        var item = Model.ElementAt(i);
        <div class="column span-225px prepend-10px last" style="height: 78px;">
            <div class="span-2" >
                <a href="@Url.Action("Details", new { id = item.Id })">
                    <img style="max-height: 75px; max-width: 75px;" src="@item.WikiData().ImageUrl"
            alt="@item.DisplayName" /></a>
            </div>
            <div class="span-145px last">
                <h6 >
                    <a href="@Url.Action("Details", new { id = item.Id })">@item.DisplayName</a></h6>
                DoB: @String.Format("{0:d}", item.DateOfBirth) Age: @item.Age<br />
                RiP: @String.Format("{0:d}", item.DateOfDeath)<br />
            </div>
        </div> 

@*                    if (i % 2 == 0)
                    {
        <div class="span-340px prepend-10px">
            <div class="span-4">
                <a href="@Url.Action("Details", new { id = item.Id })">
                    <img height="75px" src="@item.WikiData().ImageUrl"
            alt="@item.DisplayName" /></a>
            </div>
            <div class="span-4 last">
                <h3>
                    <a href="@Url.Action("Details", new { id = item.Id })">@item.DisplayName</a></h3>
                DoB: @String.Format("{0:d}", item.DateOfBirth)<br />
                RiP: @String.Format("{0:d}", item.DateOfDeath)<br />
                <a href="@item.WikiLink " target="_blank" >View on Wikipedia</a>
            </div>
        </div> 
                    }
                    else
                    {
        <div class="span-340px last">
            <div class="span-4">
                <a href="@Url.Action("Details", new { id = item.Id })">
                    <img height="75px" src="@item.WikiData().ImageUrl"
            alt="@item.DisplayName" /></a>
            </div>
            <div class="span-4 last">
                <h3>
                    <a href="@Url.Action("Details", new { id = item.Id })">@item.DisplayName</a></h3>
                DoB: @String.Format("{0:d}", item.DateOfBirth)<br />
                RiP: @String.Format("{0:d}", item.DateOfDeath)<br />
                <a href="@item.WikiLink " target="_blank" >View on Wikipedia</a>
            </div>
        </div> 
                    }
*@    }
</div>
